<template>
  <div>
    <LunBu />
    <Title title="精品推荐" :src="Jinpinsrc" />
    <RecommendationList :data="data" />
    <Title title="热门兑换" :src="hot" />
    <Advertising />
    <RecommendationList :data="rexiaodata" />
    <IntegralGuide />
  </div>
</template>

<script>
import Title from "@/components/home/Title.vue";
import Advertising from "@/components/home/Advertising.vue";
import LunBu from "@/components/home/LunBu.vue";
import RecommendationList from "@/components/home/RecommendationList.vue";
import IntegralGuide from "@/components/home/IntegralGuide.vue";
import {
  getJinPindataApi,
  getRexiaodataApi,
  getphonedataApi,
} from "@/request/api";
export default {
  data() {
    return {
      Jinpinsrc: require("@/assets/images/home/Recommend.png"),
      hot: require("@/assets/images/home/hot.png"),
      Jifen: require("@/assets/images/home/integral.png"),
      // 精品推荐的数据
      data: null,
      // 热门的数据
      rexiaodata: [],
    };
  },
  components: {
    Title,
    LunBu,
    RecommendationList,
    Advertising,
    IntegralGuide,
  },
  created() {
    // 精品推荐的请求
    getJinPindataApi().then((res) => {
      this.data = res.data.data.data.records;
    });
    // 热门兑换
    getRexiaodataApi().then((res) => {
      this.rexiaodata = res.data.data.data.records;
    });
  },
};
</script>
 
<style lang = "less" scoped>
</style>